Skip to main content

All Questions

1vote
1answer
168views

Categorical encoded variables in scikit-learn diabetes dataset [closed]

When using sklearn.datasets import load_diabetes, the sex variable which is categorical, is scaled to continuous values. Is it even legal to scale such variables?
Ashish Rai's user avatar
2votes
4answers
6kviews

why to use Scaler.fit only on x_train and not on x_test for normalizing value using MinMaxScaler?

while normalising the data everone is saying that we need to fit only on x_train and not on x_test ? why is that we should not fit x_test ? if we should not fit the scaler on x_test then why we need ...
star's user avatar
  • 1,511
2votes
3answers
10kviews

Different number of features after using OneHotEncoder

I have train and test data in two separate files. OneHotEncoder gives different number of features for Train and Test Data based on the different values they have. But the classifier requires that ...
Sameed's user avatar

close